package com.hbyj.object;

import com.hbyj.hbm.vo.Functions;

public class ZTreeNode {
	//{ id:13, pId:1, name:"父节点13 - 没有子节点", isParent:true},
	private int id;
	private int pId;
	private String name;
	private int fLevel;
	
	public ZTreeNode(Functions hiberObj){
		this.FillObjectWithHibernateObj(hiberObj);
	}
	
	public void setpId(int pId) {
		this.pId = pId;
	}
	public int getpId() {
		return pId;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getId() {
		return id;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
	
	private void FillObjectWithHibernateObj(Functions hiberObj){
		this.id = hiberObj.getId();
		this.pId = hiberObj.getParentId();
		this.name = hiberObj.getName();
		this.fLevel = hiberObj.getFlevel();
	}

	public void setfLevel(int fLevel) {
		this.fLevel = fLevel;
	}

	public int getfLevel() {
		return fLevel;
	}
}
